import java.util.Arrays;
import java.util.Scanner;

public class Practice1107 {
    //微信红包
    private static int getValue(int[] gifts, int n) {
        // write code here
        Arrays.sort(gifts);
        int count = 1;
        int num=gifts[0];
        for(int i=1;i<gifts.length;i++){
            if(gifts[i]==num){
                count++;
            }else{
                count=1;
                num=gifts[i];
            }
            if(count>=n/2){
                return gifts[i];
            }
        }
        return 0;
    }

    public static void main44(String[] args) {
        int[] a={1,2,3,2,2};
        int ret=getValue(a,5);
        System.out.println(ret);
    }
    //洗牌
    public static void main45(String[] args){
        Scanner scan = new Scanner(System.in);
        int T=scan.nextInt();
        while(T>0){
            int n=scan.nextInt();
            int k=scan.nextInt();
            int[] array=new int[n*2];
            for(int i=0;i<array.length;i++){
                array[i]=scan.nextInt();
            }

            while(k>0){
                //左右牌洗完之后也要重新分
                int[] left=new int[n];
                for(int i=0;i<n;i++){
                    left[i]=array[i];
                }
                int[] right=new int[n];
                for(int i=0;i<n;i++){
                    right[i]=array[n+i];
                }
                for(int i=0;i<n;i++){
                    array[2*i]=left[i];
                    array[2*i+1]=right[i];
                }
                k--;
            }
            for(int i=0;i<n*2;i++){
                System.out.print(array[i]+" ");
            }
            System.out.println();
            T--;
        }
    }
}
